#pragma once

#include "IGameState.h"
#include "../SGD Wrappers/SGD_Handle.h"			// uses HTexture & HAudio
#include "../SGD Wrappers/SGD_Geometry.h"




class MainMenuState : public IGameState
{
public:
	
	static MainMenuState* GetInstance( void );

	const SGD::HTexture GetReticle(void) const	{ return m_hReticleImage; }

	
	virtual void	Enter( void );	
	virtual void	Exit ( void );	

	virtual bool	Input( void );	
	virtual void	Update( float elapsedTime );	
	virtual void	Render( void );	


private:
	
	MainMenuState( void )			= default;
	virtual ~MainMenuState( void )	= default;

	MainMenuState( const MainMenuState& )				= delete;	
	MainMenuState& operator= ( const MainMenuState& )	= delete;


	
	// manu items
	enum MenuItems { PLAY_GAME, HOW_TO_PLAY, OPTIONS, CREDITS, EXIT };

	// cursor
	int		m_nCursor = 0;

	bool	clicked	= false;
	bool	selected = false;

	int		m_mPrevious = 0;


	// images
	SGD::HTexture	m_hBackgroundImage	= SGD::INVALID_HANDLE;
	SGD::HTexture	m_hTitleImage		= SGD::INVALID_HANDLE;

	SGD::HTexture	m_hReticleImage		= SGD::INVALID_HANDLE;
	SGD::HTexture	m_hButton1			= SGD::INVALID_HANDLE;
	SGD::HTexture	m_hButton2			= SGD::INVALID_HANDLE;


	// sounds
	SGD::HAudio		m_hButtonSwitchSFX	= SGD::INVALID_HANDLE;
	SGD::HAudio		m_hMenuChangeSFX	= SGD::INVALID_HANDLE;



	// selection rectangles
	SGD::Rectangle * selectonrects = nullptr;


	// drawing data
	int*	stringlengths				= nullptr;// [NUM_CHOICES] = { 9, 11, 7, 7, 4 };
	float	starting_x					= 35.0F;
	float	starting_y					= 200.0F;
	float	vertical_offset				= 100.0F;
	float	text_scale					= 0.67F;
};


